package com.haredot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.haredot.entity.User;
import com.haredot.entity.UserBlack;
import com.haredot.vo.UserFriendsVo;
import com.haredot.vo.UserScoreVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    Page<UserScoreVo> findUserScores(Page<UserScoreVo> page, @Param("userId") Long userId);

    List<Map<String, String>> findTotalScoreAndFansAndAttachAndRemarks(@Param("userId") Long userId);

    List<UserFriendsVo> findUserFriends(@Param("userId") Long userId);

    UserFriendsVo findUserFriend(@Param("currentUserId") Long userId, @Param("friendUserId") Long uid);

    long findAttentionCount(@Param("currentUserId") Long currentUserId, @Param("userId") Long uid);

    UserBlack findBlackByUid(@Param("currentUserId")Long currentUserId, @Param("userId")Long uid);
}